add validity check for empty subsets in getData methods. #1