add numberformatexception for String input