use Platform.Is.. instead of home rolled.