Fix activeEditable === null errors for commands (FF)

Executing editor actions (e.g. bold, italic...) in Firefox (and perhaps elsewhere, too) is not reliable, as sometimes the activeAditable is null and an error is thrown. This PR fixes this by adding additional checks.