Can platfrom be null? Should not an exception be thrown here, similarly to target?