Add isObjectOrNull

@sgiroux Can you take a look