Check for vhost option in order to avoid runtime exception if vhost is nil