LPS-51401 Only perform the null check if it's necessary