Refactor Configuration class type checking