Fix error when converting empty value to id. Now return null