Improved error messaging when not a valid object or no members