$newAvatar can be undefined if neither a path nor a file is posted