Process failing in VM

If it was a null value , shouldn’t the same exception occur while I run the automation on my local machine ?
Because apparently it is not occuring on my machine