I've gone with the style

if(condition) {
// Block
}

which appears to be commonly used throughout that file?

I was missing a null check (which I've just added), and have expanded on my function comments a bit more. Closer to what's expected? (The if() statement is now identical to other promise check within the same file)