```if (selectedBlock) {``` will suffice in this case, and space around ```(``` and ```)``` is needed to observe code style.