added error message to stop adding to NoneType blocks