use getInt, getBoolean, getString etc. It's cleaner than casting