added cases were input is abs, negate or clear
added method to check whether string input is a valid number or fraction. Did this in a long-winded way. I do not know the java equivalent of the python IS IN otherwise i could have just done character y IS IN 0123456789