Refs #8936. Check for null on every retrieve.

If workspace is not found/is of incorrect type - NotFoundError is
thrown.
Refs #8936. Unify workspace checking code.
Refs #8936. Catch exceptions from table creation.
Refs #8936. Improve checking method.
Refs #8936. Refresh tables if not found on creation.