I think it’s because you return an Object type.
If you want to return float, you need to write: HashMap<String, Float>