fix: add missing isNothing() check