add null check for session_timeout_ms

fixes #504
Merge branch '0.20'