added validity check for Frame