In a sense, there are two different notions of trigonometric functions — although they do agree with each other on their common domain, so to speak.
One concept is that of trigonometric functions of an acute angle in a right triangle. This definition ONLY makes sense for angles $0^{\circ}<\theta<90^{\circ}$, or $0<\theta<\frac{\pi}{2}$ in radians. There's no smallest or largest possible value of $\theta$ here (for example, $\theta$ can be an arbitrarily small positive number). But from this point of view, expressions like "$\cos(0^{\circ})$" or "$\cos(180^{\circ})$" certainly do NOT make any sense, because there are no such right triangles.
But then there's a much more general concept of trigonometric functions as functions defined for all real numbers. Geometrically, one possible way to introduce them is via the unit circle. With this definition, statements such as "$\cos(0^{\circ})=1$" or "$\cos(180^{\circ})=-1$" make perfect sense. And by the way, note that for angles lying within the first quadrant this definition coincides with the right triangle definition.
So the answer depends on the context. There are certainly no triangles with angles of $0^{\circ}$ or $180^{\circ}$. Whether that invalidates trig functions of such angles or not… see above.