Raise ValueError if filename is None and instance of PickeableObject doesn't have _pickle_filename attribute