Fix NPE. Allow nulls.