add `if (extensions != null)`
add
if (extensions != null)