cast values to their appropriate types when running scoring functions