THEMA 1 Reallow parameter equal to None, obligatory by condition
THEMA 1 Moved config read into function and made tests work