demo/viewer: add some safety null checks for HTMLElements
demo/viewer: add some safety null checks for HTMLElements

opensheetmusicdisplay/opensheetmusicdisplay,opensheetmusicdisplay/opensheetmusicdisplay,opensheetmusicdisplay/opensheetmusicdisplay