Improve check for object literal accessor in inject()