Fixed a potential NullPointerException.

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