Refactored check with regexp to error type checking
Refactored check with regexp to error type checking

- Changed as per review here: https://github.com/TryGhost/Ghost-Admin/pull/1560#discussion_r420040384

kevinansfield/Ghost-Admin,TryGhost/Ghost-Admin,TryGhost/Ghost-Admin,kevinansfield/Ghost-Admin