Improved undefined/null checking.

Improved undefined/null checking for empty arrival/departure dates.