handle illegal values by adding handling of None-types here and there