Wrote basic data validation for Resource init function.