Php assertion for type integrity