Forgot to use double = signs for checking deviceType