Could you put that field inside the params before you cast it? Then the type would have all the info it needed.