comment only whitespace cleanup
switched from type() to isinstance()