check valid class in save methods too