Fixed a unary negation bug caused by empty strings being considered
isOperator(). Fixed by adding input check in IsOperator().