api: Normalize startYear to an integer

Unless it's an empty string, since that means 'all years.'