fixed a tiny bug for checking 'None' value