Fixed bug that raised an error for a null value