Use Java's Number API to fetch numeric values.