[java] How can I check if a value is of type Integer?