added toLong cast function

why is dataTypes.get(0) used as returnType ?