added toLong cast function
add ToIntArrayFunction
made casting of primitives more generic
add ToLongArrayFunction
add ToDoubleArrayFunction
added toBoolean cast function
added toDoublFunction
added toFloatFunction
added toByteFunction
added toShortFunction
added toBooleanArrayFunction
added ToByteArrayFunction
added ToFloatFunction
added toShortArrayFunction
use generic precondition check
simplified precondition check to cast functions
add cast expression support