The built-in function len returns the number of elements in a map:

https://codeeval.dev/gist/eb405783993a6efab3d0bf4ead476e4d

A nil map has size 0:

https://codeeval.dev/gist/5a372359868c4e8cb5aba92732e153ce