Update Server.php

Added a check to avoid un-necessary calls.