Fixed bug with hasownproperties and wrong value type