FIX if query is empty assume it is null