clean-up error handling for matlabFunction

Less obnoxious when sympy has no codegen.