Even if there is a law I very much doubt any cop is going to harass you for biking on the sidewalk if you do it without endangering pedestrians. So legally you'll be ok. Morally you're ok too - if you're polite and respectful to other sidewalk users, I see no problem.