added isRunningOnServer helper function