Added checks for each endpoint