com.hazelcast.util packge checkstyle and findbugs

no need to cast explicitly, since toObject method has a generic return value