added method for checking if None