check for query function type