Fixed small bug where null value should return null instead of error