Create a function called daysInYear
that returns the number of days in the given year. If what is provided to the function is not a positive integer, it should throw an exception. Sample usage:
daysInYear(2019); // 365
daysInYear('2019'); // exception
daysInYear(2020); // 366
daysInYear(2020.2); // exception
daysInYear(2100); // 365
daysInYear({year: 2100}); // exception