MDL-42429 mod_lesson: removed unnecessary conditional check causing a PHP notice