Added Exception Handling for evaluate()