add a null check on version number comparison