raise errors for invalid months