Fix null return type bugs