Changes to use None instead of empty strings and correct query as a required argument