Fixed the problem in doing muliplication, whenever the types of lhs and rhs do not match. In these cases, this error was thrown before:
java.lang.ClassCastException: java.lang.Long cannot be cast to java.lang.Double