Using isinstance('a', str) is more preferable than type('a') == str