Adding a conditional statement as it broke my frontend integration (which makes it easy to test my API).