Check for an option object before checking length