Minor fixes for nulls and JSObject lookups