No, a NULL value could not produce the error.
The only way we have found to produce the behavior descript by the OP is to do something like the following:
key = '1'
map[key] = 'abc'
ErrorMode(@Off)
value = map[key]
bTest = MapKeyExist(map, key)
The reason the above produces behavior like that described by the OP is that the line map[key] = 'abc' doesn't create a WIL map. It creates a regular WIL array and the ErrorMode(@Off) line suppress the error generated by MapKeyExist.
There are several ways to avoid the above problem. You can create an empty map before assigning any values to the map. For example,
map = MapCreate()
map['1'] = 'abc'
bTest = MapKeyExist(map, '1')
correctly creates a WIL map that contains the key value "1".
Another way to prevent the problem is to make sure the key that creates the map cannot be converted to a number. For example,
map['not all digits'] = 'abc'
bTest = MapKeyExist(map, 'not all digits')
This behavior is also covered in the Consolidated WIL Help file.