change assertion to debug if the active document is null
Merge pull request #152 from vasily-kirichenko/change-assertion-to-debug-when-active-doc-is-null

change assertion to debug if the active document is null