Made tables crash less.

Added non-null check.