Check if an item id is a valid block

I am reading the item id from an item frame, and I need to know whether it is a block or not.
Continue to help post