Extract method to sanitize objective c object