Make isRunningInBrowser and isNotRunningInBrowser functions