Telling jokes in the workplace is not inherently a bad thing. It can help you bond with other employees. It can relieve stress and tension. It can help people get to know one another. If you're a new employee, it can allow you to make a statement and show your unique personality.
Employers have long been criticized for providing their breastfeeding employees with inadequate time or accommodations to allow them to pump as needed during their work day. A study published just last month shows that the treatment of nursing moms goes far beyond being discriminatory - it also often results in them losing their job.
Telling jokes may be a big part of your office culture. That's fine. However, many jokes are made at someone else's expense. That's when they can cross the line into harassment.