optimise comparision of longs and text values