Assert empty keys are removed from query