add check for null before calling method on editor object