code: public void addPhoto(Photo photo) {
          Photo.PhotoType type = photo.getType();
          if (postType != null && !postType.equals(type)) {
              throw new IllegalArgumentException("Photos must all be the same type (source or data)");
          }
          if (pendingPhotos == null) {
              pendingPhotos = new ArrayList<Photo>();
          }
          pendingPhotos.add(photo);
          this.postType = type;
      }
docs: Add a photo to this post (multiple allowed) for Photoset
  @param photo the photo to add
  @throws IllegalArgumentException photo type clash