fixed bug in qfilter where math.isnan was being called on non-floats