It depends. Jokes or slurs about your gender identity may be considered a form of sexual harassment, which courts have determined is a form of illegal discrimination. However, federal law does not prohibit simple teasing, offhand comments, or isolated incidents that are not extremely serious. Generally the conduct must be sufficiently frequent or severe to create a hostile work environment or result in a "tangible employment action," such as hiring, firing, promotion, or demotion. The EEOC notes that harassment can include offensive remarks about a person's sex. For more information about hostile work environments, see our page on sexual harassment.