Rename Category key to id and implement validation of id