Wouldn't it be nice if had an explicit helper function for that? Would also make the comment unnecessary and likely clean up redundant checks in the code.