adding data validations to prevent crashes