Return null if layer cannot be created