if a key comes in as false set to null

I am using ng-file-upload and it seems that the value of key when passed is false which errors on the foreach. Returning the key fails the test returning null allows the test to go on.