don't call after_create when type is nil
change from template branch