Made SENTRY_DSN optional to prevent it from raising misleading exceptions.

Fixes #1900.
Merge pull request #1902 from jezdez/fix-sentry-settings

Made SENTRY_DSN optional to prevent it from raising misleading exceptions.