isEqual: handle null argument and null values

A null argument could be passed to isEqual. Also the values in the map
can also be null.

Signed-off-by: BJ Hargrave <bj@bjhargrave.com>