Fixed a bug where an invalid error would get raised when a calculation have no return type