Add null pointer check for bug 1228601.