let's just skip the loop if it's null instead of doing a pointless allocation