Guard against accesing a property when isMasterDoc is undefined