Nil check may resolve #978