fix default timeout check, fixes #2171
use different approach to check nullable env var #2523 #2171