Refactor env check to its own method.

Reusable by both rack env setter and configuration loader.

Making sure default environment (development) config will be checked when no environment setting is set.