Check if the #retrive method criteria is a Hash or not for custom queries