Both `isNil` and `isObject` seems not used. Remove them if they're not necessary.