Allows undef to be a valid type for reference directory.