Fix null dereference

I found a possible null dereference because my IDE marked it as warning. I think the intention was to use `&&` instead of `||`, please have a look if it makes sense!