return null if null passed through, minor optimisation, and keeps null values usable