Added validation for microposts