Fix 500 error for missing diff with commit id present

Catch unusual case when note's diff is misssing, but commit id is found