Extract shouldFloat method