try/catch variable type checking to deal with solvers