Fix object.keys on non-objects in weird cases