Better checking for self argument to function.