Added tests for castToNum