Code polish

Eliminated unuseful check isObject