replace undefined check with "none"