Improve if statement compatibility when checking if VM already exists

Fixes #4