Compare types using isinstance

Plus small formatting fix
Merge pull request #4866 from basepi/saltcall4114

Compare types using isinstance