Preventing search methods to be called without ID or name