Protect against potential NullPointerException.

Signed-off-by: Carl Thronson <cthronson@actuate.com>