Better checking when resource not found