Fixed strict type checks, previously replaced by isinstance with AutoPEP8