Fix crash when accessing invalid fields on objects which don't have prototypes